
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>Overview of Stratified Plume Model Module &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/doctools.js"></script>
    <script src="../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="stratified_plume_model.Model" href="../autodoc/spm/stratified_plume_model.Model.html" />
    <link rel="prev" title="single_bubble_model.plot_state_space" href="../autodoc/sbm/single_bubble_model.plot_state_space.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="overview-of-stratified-plume-model-module">
<h1>Overview of Stratified Plume Model Module<a class="headerlink" href="#overview-of-stratified-plume-model-module" title="Permalink to this headline">¶</a></h1>
<dl class="field-list simple">
<dt class="field-odd">Release</dt>
<dd class="field-odd"><p>2.1</p>
</dd>
<dt class="field-even">Date</dt>
<dd class="field-even"><p>Jun 05, 2020</p>
</dd>
</dl>
<span class="target" id="module-stratified_plume_model"></span><div class="section" id="stratified-plume-model">
<h2>Stratified Plume Model<a class="headerlink" href="#stratified-plume-model" title="Permalink to this headline">¶</a></h2>
<p>Simulate a buoyant plume in stratification dominate or quiescent conditions</p>
<p>This module defines the classes, methods, and functions necessary to simulate
the buoyant plume behavior in stratification dominant conditions, where the
effects of crossflows are negligible. The ambient water properties are
provided through an <cite>ambient.Profile</cite> class object, which contains a
netCDF4-classic dataset of CTD data and the needed interpolation methods. The
<cite>dbm</cite> class objects <cite>dbm.FluidParticle</cite> and <cite>dbm.InsolubleParticle</cite> report the
properties of the dispersed phase during the simulation, and these methods
are provided to the model through the objects defined in <cite>dispersed_phases</cite>.</p>
<div class="section" id="notes">
<h3>Notes<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h3>
<p>This model is a double plume integral model following the approach in
Socolofsky et al. (2008), but including the capability to have an arbitrary
number of dispersed phases, each with its own particle size distribution.</p>
<p>Detrainment to for subsurface intrusions follows the approach in Crounse
(2000).</p>
</div>
<div class="section" id="see-also">
<h3>See Also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h3>
<dl class="simple">
<dt><cite>single_bubble_model</cite><span class="classifier">Tracks the trajectory of a single bubble, drop or</span></dt><dd><p>particle through the water column.  The numerical solution used here,
including the various object types and their functionality, follows the
pattern in the <cite>single_bubble_model</cite>.  The main difference is the more
complex state space and governing equations.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="class-objects-and-methods">
<h2>Class Objects and Methods<a class="headerlink" href="#class-objects-and-methods" title="Permalink to this headline">¶</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">Model</span></code> object is the main interface to the <code class="docutils literal notranslate"><span class="pre">stratified_plume_model</span></code>.
Its definition and methods are as follows:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.html#stratified_plume_model.Model" title="stratified_plume_model.Model"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model</span></code></a>([profile, simfile])</p></td>
<td><p>Master class object for controlling and post-processing the simulation</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.simulate.html#stratified_plume_model.Model.simulate" title="stratified_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model.simulate</span></code></a>(self, particles, z, R[, …])</p></td>
<td><p>Simulate the plume dynamics from given initial conditions</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.save_sim.html#stratified_plume_model.Model.save_sim" title="stratified_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model.save_sim</span></code></a>(self, fname, profile_path, …)</p></td>
<td><p>Save the current simulation results</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.save_txt.html#stratified_plume_model.Model.save_txt" title="stratified_plume_model.Model.save_txt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model.save_txt</span></code></a>(self, base_name, …)</p></td>
<td><p>Save the state space in ascii text format for exporting</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.load_sim.html#stratified_plume_model.Model.load_sim" title="stratified_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model.load_sim</span></code></a>(self, fname)</p></td>
<td><p>Load in a saved simulation result file for post-processing</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.plot_state_space.html#stratified_plume_model.Model.plot_state_space" title="stratified_plume_model.Model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model.plot_state_space</span></code></a>(self, fig)</p></td>
<td><p>Plot the simulation state space</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.Model.plot_all_variables.html#stratified_plume_model.Model.plot_all_variables" title="stratified_plume_model.Model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Model.plot_all_variables</span></code></a>(self, fig)</p></td>
<td><p>Plot a comprehensive suite of simulation results</p></td>
</tr>
</tbody>
</table>
<p>All of the model parameters are contained in the <code class="docutils literal notranslate"><span class="pre">ModelParams</span></code> object. This
object is described in the following:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.ModelParams.html#stratified_plume_model.ModelParams" title="stratified_plume_model.ModelParams"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ModelParams</span></code></a>(profile)</p></td>
<td><p>Fixed model parameters for the stratified plume model</p></td>
</tr>
</tbody>
</table>
<p>Local variables defined for each slice of the inner plume are stored in an
<code class="docutils literal notranslate"><span class="pre">InnerPlume</span></code> object. Its definition and methods are as follows:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.InnerPlume.html#stratified_plume_model.InnerPlume" title="stratified_plume_model.InnerPlume"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InnerPlume</span></code></a>(z0, y0, profile, particles, p, …)</p></td>
<td><p>Manages the inner plume state space and derived variables</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.InnerPlume.update.html#stratified_plume_model.InnerPlume.update" title="stratified_plume_model.InnerPlume.update"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InnerPlume.update</span></code></a>(self, z, y, particles, …)</p></td>
<td><p>Update the <cite>InnerPlume</cite> object with the current local conditions</p></td>
</tr>
</tbody>
</table>
<p>Likewise, local variables defined for each slice of the outer plume are
stored in an <code class="docutils literal notranslate"><span class="pre">OuterPlume</span></code> object. Its definition and methods are as follows:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.OuterPlume.html#stratified_plume_model.OuterPlume" title="stratified_plume_model.OuterPlume"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OuterPlume</span></code></a>(z0, y0, profile, p, chem_names, bi)</p></td>
<td><p>Manages the outer plume state space and derived variables</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.OuterPlume.update.html#stratified_plume_model.OuterPlume.update" title="stratified_plume_model.OuterPlume.update"><code class="xref py py-obj docutils literal notranslate"><span class="pre">OuterPlume.update</span></code></a>(self, z, y, profile, p, bi)</p></td>
<td><p>Update the <cite>OuterPlume</cite> object with the current local conditions</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-functions">
<h2>Module Functions<a class="headerlink" href="#module-functions" title="Permalink to this headline">¶</a></h2>
<div class="section" id="utility-functions">
<h3>Utility Functions<a class="headerlink" href="#utility-functions" title="Permalink to this headline">¶</a></h3>
<p>The stratified plume model objects defined above use several utilities to
perform their numerical tasks. These are generally not intended to be called
directly by the user and are summarized below:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.inner_main.html#stratified_plume_model.inner_main" title="stratified_plume_model.inner_main"><code class="xref py py-obj docutils literal notranslate"><span class="pre">inner_main</span></code></a>(yi, yo, particles, profile, p, …)</p></td>
<td><p>Manage the integration of the inner plume</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.outer_main.html#stratified_plume_model.outer_main" title="stratified_plume_model.outer_main"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outer_main</span></code></a>(yi, yo, particles, profile, p, …)</p></td>
<td><p>Manage the integration of the outer plume segments</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.err_check.html#stratified_plume_model.err_check" title="stratified_plume_model.err_check"><code class="xref py py-obj docutils literal notranslate"><span class="pre">err_check</span></code></a>(zi, yi, zo, yo, zi_old, yi_old, …)</p></td>
<td><p>Computes the error between two solutions of the state space.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.plot_state_space.html#stratified_plume_model.plot_state_space" title="stratified_plume_model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a>(zi, yi, zo, yo, yi_local, …)</p></td>
<td><p>Plot the state space for interrogation during model convergence</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.plot_all_variables.html#stratified_plume_model.plot_all_variables" title="stratified_plume_model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a>(zi, yi, zo, yo, yi_local, …)</p></td>
<td><p>Plot the complete variable suite for model validation and interpretation</p></td>
</tr>
</tbody>
</table>
<p>There are also some functions designed to help create initial conditions for
the model. These are:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.particle_from_Q.html#stratified_plume_model.particle_from_Q" title="stratified_plume_model.particle_from_Q"><code class="xref py py-obj docutils literal notranslate"><span class="pre">particle_from_Q</span></code></a>(profile, z0, dbm_particle, …)</p></td>
<td><p>Create a <cite>dispersed_phases.PlumeParticle</cite> object from volume flux</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/stratified_plume_model.particle_from_mb0.html#stratified_plume_model.particle_from_mb0" title="stratified_plume_model.particle_from_mb0"><code class="xref py py-obj docutils literal notranslate"><span class="pre">particle_from_mb0</span></code></a>(profile, z0, dbm_particle, …)</p></td>
<td><p>Create a <cite>dispersed_phases.PlumeParticle</cite> object from the mass flux</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="numerical-model-functions">
<h3>Numerical Model Functions<a class="headerlink" href="#numerical-model-functions" title="Permalink to this headline">¶</a></h3>
<p>The main numerical modeling functions for the stratified plume model are
stored in the <code class="docutils literal notranslate"><span class="pre">smp</span></code> module. These functions could be ported to Fortran or
another language, but are not intended for the user to call directly.
Instead, these are used by the objects defined above. The functions contained
in the <code class="docutils literal notranslate"><span class="pre">smp</span></code> module are:</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/smp.derivs_inner.html#smp.derivs_inner" title="smp.derivs_inner"><code class="xref py py-obj docutils literal notranslate"><span class="pre">derivs_inner</span></code></a>(z, y, yi, yo, particles, …)</p></td>
<td><p>Calculate the derivatives for the system of ODEs for the inner plume</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/smp.derivs_outer.html#smp.derivs_outer" title="smp.derivs_outer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">derivs_outer</span></code></a>(z, y, yi, yo, particles, …)</p></td>
<td><p>Calculate the derivatives for the system of ODEs for the outer plume</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/smp.calculate.html#smp.calculate" title="smp.calculate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">calculate</span></code></a>(yi, yo, particles, profile, p, …)</p></td>
<td><p>Integrate an inner or outer plume segment from <cite>z0</cite> to <cite>zf</cite></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/smp.correct_temperature.html#smp.correct_temperature" title="smp.correct_temperature"><code class="xref py py-obj docutils literal notranslate"><span class="pre">correct_temperature</span></code></a>(r, yi, particles, profile, p)</p></td>
<td><p>Make sure the correct temperature is stored in the state space solution</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/smp.cp_model.html#smp.cp_model" title="smp.cp_model"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cp_model</span></code></a>(epsilon, particles, rho_a, rho, g, …)</p></td>
<td><p>Continuous peeling model of Crounse (2000)</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/smp.main_ic.html#smp.main_ic" title="smp.main_ic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">main_ic</span></code></a>(profile, particles, p, z0, R)</p></td>
<td><p>Compute the initial conditions for the inner plume state space</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/smp.inner_plume_ic.html#smp.inner_plume_ic" title="smp.inner_plume_ic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">inner_plume_ic</span></code></a>(profile, particles, p, z, Q, …)</p></td>
<td><p>Build the inner plume state space given the initial conditions</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/smp.outer_surf.html#smp.outer_surf" title="smp.outer_surf"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outer_surf</span></code></a>(yi, p)</p></td>
<td><p>Compute the initial condition for the outer plume at the sea surface</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/smp.outer_dis.html#smp.outer_dis" title="smp.outer_dis"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outer_dis</span></code></a>(yi, particles, profile, p, …)</p></td>
<td><p>Compute the initial condition for the outer plume at the DMPR</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../autodoc/spm/smp.outer_cpic.html#smp.outer_cpic" title="smp.outer_cpic"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outer_cpic</span></code></a>(yi, yo, particles, profile, p, …)</p></td>
<td><p>Compute the initial condition for the outer plume at depth</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="../autodoc/spm/smp.outer_fr.html#smp.outer_fr" title="smp.outer_fr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">outer_fr</span></code></a>(u_0, Q, bi, rho_a, rho, g, Fr_0)</p></td>
<td><p>Compute the outer plume initial width and velocity</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../index.html">Documentation overview</a><ul>
  <li><a href="../user_manual.html">TAMOC User Manual</a><ul>
      <li>Previous: <a href="../autodoc/sbm/single_bubble_model.plot_state_space.html" title="previous chapter">single_bubble_model.plot_state_space</a></li>
      <li>Next: <a href="../autodoc/spm/stratified_plume_model.Model.html" title="next chapter">stratified_plume_model.Model</a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../_sources/modules/spm.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>